<template>
	<view style="background-color: #F8F8F8; overflow-x: hidden;">
		<view class="nav-back">
			<top-heigth backTitle="用户评价"></top-heigth>
		</view>
		<view class="content-box" >
			<view style="margin-bottom: 24rpx;"></view>
			<view v-if="list.length == 0" class="kong-box">
				<uv-empty mode="" text="技师还没有评论呦~" icon="/static/image/kong-js.png"></uv-empty>
			</view>
			<view class="public-box m-b16" v-for="item in list">
				<view class="comment-box">
					<view class="comment-top">
						<view class="comment-l">
							<view class="head">
								<image :src="item.tAppUserVo.userSex == 0 ? '/static/image/photo_gril.png' : '/static/image/mine-head.png'" mode="heightFix"></image>
							</view>
							<view class="comment-r">
								<view class="">{{item.userName}}</view>
								<uv-rate :value="item.score" readonly></uv-rate>
							</view>
						</view>
						<view class="font-hui">{{item.updateTime}}</view>
					</view>
					<view class="font-hui m-t24">{{item.comment}}</view>
					<view style="width: 100%;">
							<uv-album :urls="setUrlFn(item.commentImg)" multipleSize="138rpx" space="8rpx"></uv-album>
						</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import TopHeigth from '@/components/TopHeigth.vue'
	
	export default {
		data() {
			return {
				list:'',
				id: null,
				urls: []
			}
		},
		components: { TopHeigth },
		onLoad(e) {
			this.id = e.id
			this.getComment()
		},
		methods: {
			setUrlFn(imgs){
				if(imgs){
					  return imgs.split(",")	
				
				}else{
				 	return []
				}
				
			},
			getComment(type) {
				uni.$u.http.post('/api/shop/v1_0/tAppUserCommentRCA/queryTAppUserComment',{
					staffId: this.id,
					isExamine: 1
				}).then((res) => {
					this.list = res.aaData
				}) 
			},
		}
	}
</script>

<style lang="scss" scoped>
	@mixin flex($direction: row) {
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: $direction;
	}
	.uv-nav-slot {
		@include flex;
		align-items: center;
		justify-content: space-between;
		border-width: 0.5px;
		border-radius: 100px;
		border-color: #dadbde;
		padding: 3px 7px;
		opacity: 0.8;
	}
	
	.comment-box{
		
		.comment-top{
			display: flex;
			justify-content: space-between;
			.comment-l{
				display: flex;
				justify-content: space-between;
				.head{
					background: red;
					overflow: hidden;
					width: 76rpx;
					height: 76rpx;
					border-radius: 76rpx;
					margin-right: 24rpx;
					image{
						width: 76rpx;
						height: 76rpx;
					}
				}
				
			}
		
		}
	}
	
	.imgList{
		
	}
	
	
</style>
